<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
		<title>主页</title>
		<link rel="stylesheet" href="css/result.css" />
		<link rel="stylesheet" href="css/index.css" />
		<link rel="stylesheet" href="layer/mobile/need/layer.css" />
		<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
		<script type="text/javascript" src="layer/layer.js"></script>
	<link rel="stylesheet" href="css/header.css" type="text/css"></link></head>
	<body>
	<form action="userInfo/findUserLogin" method="post">
		<div class="header" style="margin-top:10px;height:40px;line-height:40px">
			<ul>
				<c:if test="${ empty userInfo }">
				<li>
					<a class="register">注册</a>
				</li>
				</c:if>
				<li>
				<c:if test="${ empty userInfo }">
					<a class="login">登录</a>
				</c:if>
				<c:if test="${not empty userInfo }">
					<a href="jsp/back-stage/userIndex.jsp">${userInfo.nickname } </a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="userInfo/exitSys">退出</a>
				</c:if>
				</li>
				<li>
					<a href="">资源下载</a>
				</li>
				<li>
					<a href="">贴吧</a>
				</li>
				<li>
					<a href="">招聘</a>
				</li>
				<li>
					<a href="">菜鸟联盟</a>
				</li>
				<li>
					<a href="">面试题</a>
				</li>
				<li>
					<a href="">考试</a>
				</li>
			</ul>
		</div>
		
		<div style="display: none;" class="con">
			
				<div style="padding:50px" >
					<label>账号:</label>  <input type="text" autofocus="autofocus" required="required" placeholder="手机/邮箱/用户名" name="phone" id="username" style="width: 300px;height: 30px;color:gray;" /><br/><br/>
					<label>密码:</label>  <input type="password" required="required" name="pwd" style="width:300px;height:30px;color:gray;" />
					<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input type="submit" class="login1" value="登  录" style="width: 300px;height: 30px;background: blue;border:none;font-size: 16px;" />
				</div>
			
		</div>
		</form>
		<form action="userInfo/userRegister" method="post">
		<div style="display: none;" class="reg">
				<div style="padding:50px" >
					<label>账号:</label>  <input type="text" autofocus="autofocus" required="required" placeholder="手机/邮箱/用户名" name="phone" id="username" style="width: 300px;height: 30px;color:gray;" /><br/><br/>
					<label>密码:</label>  <input type="password" required="required" name="password" style="width:300px;height:30px;color:gray;" />
					<br/><br/>
					<label>昵称:</label>  <input type="text" name="nickname"/>
					<br/><br/>
					<label>邮箱:</label>  <input type="email" name="email"/>
					<br/><br/>
					<input type="submit" class="login1" value="注  册" style="width: 200px;margin-left:70px;background: blue;border:none;font-size: 16px;" />
				</div>
		</div>
		</form>
		<script type="text/javascript">
			$(".login").on("click", function() {
				layer.open({
					type: 1, //Page层类型
					area: ['500px', '300px'],
					title: '登录BUG账号',
					shade: 0.6, //遮罩透明度
					anim: 1, //0-6的动画形式，-1不开启
					content:$(".con")
				});
			});
		</script>
		<script type="text/javascript">
			$(".register").on("click", function() {
				layer.open({
					type: 1, //Page层类型
					area: ['500px', '400px'],
					title: '登录BUG账号',
					shade: 0.6, //遮罩透明度
					anim: 1, //0-6的动画形式，-1不开启
					content:$(".reg")
				});
			});
		</script>

	</body>

</html>